

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>roster_server.credentials &mdash; Roster Server v0.17 documentation</title>
    
    <link rel="stylesheet" href="../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
    
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../',
        VERSION:     'v0.17',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../_static/doctools.js"></script>
    <link rel="top" title="Roster Server v0.17 documentation" href="../../index.html" />
    <link rel="up" title="Module code" href="../index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../../index.html">Roster Server v0.17 documentation</a> &raquo;</li>
          <li><a href="../index.html" accesskey="U">Module code</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <h1>Source code for roster_server.credentials</h1><div class="highlight"><pre>
<span class="c">#!/usr/bin/python</span>

<span class="c"># Copyright (c) 2009, Purdue University</span>
<span class="c"># All rights reserved.</span>
<span class="c">#</span>
<span class="c"># Redistribution and use in source and binary forms, with or without</span>
<span class="c"># modification, are permitted provided that the following conditions are met:</span>
<span class="c">#</span>
<span class="c"># Redistributions of source code must retain the above copyright notice, this</span>
<span class="c"># list of conditions and the following disclaimer.</span>
<span class="c">#</span>
<span class="c"># Redistributions in binary form must reproduce the above copyright notice, this</span>
<span class="c"># list of conditions and the following disclaimer in the documentation and/or</span>
<span class="c"># other materials provided with the distribution.</span>
<span class="c">#</span>
<span class="c"># Neither the name of the Purdue University nor the names of its contributors</span>
<span class="c"># may be used to endorse or promote products derived from this software without</span>
<span class="c"># specific prior written permission.</span>
<span class="c">#</span>
<span class="c"># THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot;</span>
<span class="c"># AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span>
<span class="c"># IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE</span>
<span class="c"># DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE</span>
<span class="c"># FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL</span>
<span class="c"># DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR</span>
<span class="c"># SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER</span>
<span class="c"># CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,</span>
<span class="c"># OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span>
<span class="c"># OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span>


<span class="sd">&quot;&quot;&quot;Credential caching for XMLRPC services.&quot;&quot;&quot;</span>


<span class="n">__copyright__</span> <span class="o">=</span> <span class="s">&#39;Copyright (C) 2009, Purdue University&#39;</span>
<span class="n">__license__</span> <span class="o">=</span> <span class="s">&#39;BSD&#39;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s">&#39;#TRUNK#&#39;</span>


<span class="kn">import</span> <span class="nn">datetime</span>
<span class="kn">import</span> <span class="nn">inspect</span>
<span class="kn">import</span> <span class="nn">uuid</span>
<span class="kn">import</span> <span class="nn">sys</span>


<div class="viewcode-block" id="ConfigError"><a class="viewcode-back" href="../../roster_server.html#roster_server.credentials.ConfigError">[docs]</a><span class="k">class</span> <span class="nc">ConfigError</span><span class="p">(</span><span class="ne">Exception</span><span class="p">):</span>
  <span class="k">pass</span>

</div>
<div class="viewcode-block" id="CredCache"><a class="viewcode-back" href="../../roster_server.html#roster_server.credentials.CredCache">[docs]</a><span class="k">class</span> <span class="nc">CredCache</span><span class="p">(</span><span class="nb">object</span><span class="p">):</span>
  <span class="sd">&quot;&quot;&quot;Credentials cache for XMLRPC services.</span>

<span class="sd">  Authenticated users are given a time-limited credential.  Credentials map</span>
<span class="sd">  to Core instances, and can be used for repeated calls from a client.</span>

<span class="sd">  CredCaches also handle verifying credentials, and invoking API calls as</span>
<span class="sd">  those credentials.</span>
<span class="sd">  &quot;&quot;&quot;</span>

  <span class="c"># This will need a config option for the core objects, probably</span>
  <span class="k">def</span> <span class="nf">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">config_instance</span><span class="p">,</span> <span class="n">inf_renew_time</span><span class="p">,</span> <span class="n">unit_test</span><span class="o">=</span><span class="bp">False</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Constructs a new credential cache.</span>
<span class="sd">    Inputs:</span>
<span class="sd">      config_instance: instance of Config</span>
<span class="sd">      inf_renew_time: the that each credential is renewed (seconds)</span>
<span class="sd">      unit_test: boolean indicating a unit-test is being run.</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">config_instance</span> <span class="o">=</span> <span class="n">config_instance</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">exp_time</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">config_instance</span><span class="o">.</span><span class="n">config_file</span><span class="p">[</span><span class="s">&#39;credentials&#39;</span><span class="p">][</span><span class="s">&#39;exp_time&#39;</span><span class="p">]</span>
    <span class="k">if</span><span class="p">(</span> <span class="n">unit_test</span> <span class="p">):</span>
      <span class="n">sys</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">append</span><span class="p">(</span><span class="s">&#39;./&#39;</span><span class="p">)</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">authentication_method</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">config_instance</span><span class="o">.</span><span class="n">config_file</span><span class="p">[</span>
       <span class="s">&#39;credentials&#39;</span><span class="p">][</span><span class="s">&#39;authentication_method&#39;</span><span class="p">]</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">inf_renew_time</span> <span class="o">=</span> <span class="n">inf_renew_time</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">unit_test</span> <span class="o">=</span> <span class="n">unit_test</span>

    <span class="c"># garbage_collector contains cred strings in insertion order, to be walked</span>
    <span class="c"># when it&#39;s time to remove potentially expired Credentials.</span>
    <span class="bp">self</span><span class="o">.</span><span class="n">garbage_collector</span> <span class="o">=</span> <span class="p">[]</span>

<div class="viewcode-block" id="CredCache.Authenticate"><a class="viewcode-back" href="../../roster_server.html#roster_server.credentials.CredCache.Authenticate">[docs]</a>  <span class="k">def</span> <span class="nf">Authenticate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">user_name</span><span class="p">,</span> <span class="n">password</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Authenticates user against authentication method</span>

<span class="sd">    Inputs:</span>
<span class="sd">      user_name: string of user name</span>
<span class="sd">      password: string of password</span>

<span class="sd">    Outputs:</span>
<span class="sd">      boolean of whether or not user is authenticated</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="k">try</span><span class="p">:</span>
      <span class="n">authenticate_module</span> <span class="o">=</span> <span class="nb">__import__</span><span class="p">(</span>
          <span class="s">&#39;roster_server.</span><span class="si">%s</span><span class="s">&#39;</span> <span class="o">%</span> <span class="bp">self</span><span class="o">.</span><span class="n">authentication_method</span><span class="p">)</span>
      <span class="n">authentication_module</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span>
          <span class="n">authenticate_module</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">authentication_method</span><span class="p">)</span>
    <span class="k">except</span> <span class="ne">ImportError</span><span class="p">:</span>
      <span class="n">authentication_module</span> <span class="o">=</span> <span class="nb">__import__</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">authentication_method</span><span class="p">)</span>
    <span class="n">authentication_module_instance</span> <span class="o">=</span> <span class="p">(</span>
        <span class="n">authentication_module</span><span class="o">.</span><span class="n">AuthenticationMethod</span><span class="p">())</span>
    <span class="n">authenticate_module_args</span> <span class="o">=</span> <span class="n">inspect</span><span class="o">.</span><span class="n">getargspec</span><span class="p">(</span>
        <span class="n">authentication_module_instance</span><span class="o">.</span><span class="n">Authenticate</span><span class="p">)[</span><span class="mi">0</span><span class="p">]</span>
    <span class="k">if</span><span class="p">(</span> <span class="n">authenticate_module_args</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">==</span> <span class="s">&#39;self&#39;</span> <span class="p">):</span>
      <span class="n">authenticate_module_args</span><span class="o">.</span><span class="n">pop</span><span class="p">(</span><span class="mi">0</span><span class="p">)</span>
    <span class="k">for</span> <span class="n">authenticate_module_arg</span> <span class="ow">in</span> <span class="n">authenticate_module_args</span><span class="p">:</span>
      <span class="k">if</span><span class="p">(</span> <span class="n">authenticate_module_arg</span> <span class="o">==</span> <span class="s">&#39;user_name&#39;</span> <span class="ow">or</span>
          <span class="n">authenticate_module_arg</span> <span class="o">==</span> <span class="s">&#39;password&#39;</span> <span class="p">):</span>
        <span class="k">continue</span>
      <span class="k">if</span><span class="p">(</span> <span class="n">authenticate_module_arg</span> <span class="ow">not</span> <span class="ow">in</span> <span class="bp">self</span><span class="o">.</span><span class="n">config_instance</span><span class="o">.</span><span class="n">config_file</span><span class="p">[</span>
          <span class="bp">self</span><span class="o">.</span><span class="n">authentication_method</span><span class="p">]</span> <span class="p">):</span>
        <span class="k">raise</span> <span class="n">ConfigError</span><span class="p">(</span>
            <span class="s">&#39;Could not find &quot;</span><span class="si">%s</span><span class="s">&quot; value in &quot;</span><span class="si">%s</span><span class="s">&quot; in the &quot;</span><span class="si">%s</span><span class="s">&quot; section.&#39;</span> <span class="o">%</span> <span class="p">(</span>
                <span class="n">authenticate_module_arg</span><span class="p">,</span> <span class="bp">self</span><span class="o">.</span><span class="n">config_instance</span><span class="o">.</span><span class="n">config_file_path</span><span class="p">,</span>
                <span class="bp">self</span><span class="o">.</span><span class="n">authentication_method</span><span class="p">))</span>
    <span class="n">kwargs_dict</span> <span class="o">=</span> <span class="p">{}</span>
    <span class="k">for</span> <span class="n">authenticate_module_arg</span> <span class="ow">in</span> <span class="n">authenticate_module_args</span><span class="p">:</span>
      <span class="k">if</span><span class="p">(</span> <span class="n">authenticate_module_arg</span> <span class="o">==</span> <span class="s">&#39;user_name&#39;</span> <span class="p">):</span>
        <span class="n">kwargs_dict</span><span class="p">[</span><span class="s">&#39;user_name&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">user_name</span>
      <span class="k">elif</span><span class="p">(</span> <span class="n">authenticate_module_arg</span> <span class="o">==</span> <span class="s">&#39;password&#39;</span> <span class="p">):</span>
        <span class="n">kwargs_dict</span><span class="p">[</span><span class="s">&#39;password&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">password</span>
      <span class="k">else</span><span class="p">:</span>
        <span class="n">kwargs_dict</span><span class="p">[</span><span class="n">authenticate_module_arg</span><span class="p">]</span> <span class="o">=</span> <span class="p">(</span>
            <span class="bp">self</span><span class="o">.</span><span class="n">config_instance</span><span class="o">.</span><span class="n">config_file</span><span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">authentication_method</span><span class="p">][</span>
                <span class="n">authenticate_module_arg</span><span class="p">])</span>

    <span class="k">return</span> <span class="n">authentication_module_instance</span><span class="o">.</span><span class="n">Authenticate</span><span class="p">(</span><span class="o">**</span><span class="n">kwargs_dict</span><span class="p">)</span>
</div>
<div class="viewcode-block" id="CredCache.CheckCredential"><a class="viewcode-back" href="../../roster_server.html#roster_server.credentials.CredCache.CheckCredential">[docs]</a>  <span class="k">def</span> <span class="nf">CheckCredential</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">credential</span><span class="p">,</span> <span class="n">user_name</span><span class="p">,</span> <span class="n">core_instance</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Checks users credential against database.</span>

<span class="sd">    Inputs:</span>
<span class="sd">      credential: string of credential</span>
<span class="sd">      core_instance: instance of Core</span>

<span class="sd">    Outputs:</span>
<span class="sd">      string or None, None if not authenticated, empty string if</span>
<span class="sd">      authenticated, string with new uuid if infinite key is being</span>
<span class="sd">      refreshed</span>
<span class="sd">      example: None, u&#39;&#39;, u&#39;be4d4ecf-d670-44a0-b957-770e118e2755&#39;</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">current_timestamp</span> <span class="o">=</span> <span class="n">datetime</span><span class="o">.</span><span class="n">datetime</span><span class="o">.</span><span class="n">now</span><span class="p">()</span>
    <span class="k">try</span><span class="p">:</span>
      <span class="n">credential_dict</span> <span class="o">=</span> <span class="n">core_instance</span><span class="o">.</span><span class="n">_ListCredentials</span><span class="p">(</span><span class="n">credential</span><span class="o">=</span><span class="n">credential</span><span class="p">)[</span>
          <span class="n">credential</span><span class="p">]</span>
    <span class="k">except</span> <span class="ne">KeyError</span><span class="p">:</span>
      <span class="k">return</span> <span class="bp">None</span> <span class="c"># Key not in database</span>
    <span class="n">db_timestamp</span> <span class="o">=</span> <span class="n">credential_dict</span><span class="p">[</span><span class="s">&#39;last_used_timestamp&#39;</span><span class="p">]</span> <span class="o">+</span> <span class="n">datetime</span><span class="o">.</span><span class="n">timedelta</span><span class="p">(</span>
        <span class="n">minutes</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">exp_time</span><span class="p">)</span>
    <span class="k">if</span><span class="p">(</span> <span class="n">credential_dict</span><span class="p">[</span><span class="s">&#39;infinite_cred&#39;</span><span class="p">]</span> <span class="p">):</span>
      <span class="n">inf_renew</span> <span class="o">=</span> <span class="n">credential_dict</span><span class="p">[</span><span class="s">&#39;last_used_timestamp&#39;</span><span class="p">]</span> <span class="o">+</span> <span class="n">datetime</span><span class="o">.</span><span class="n">timedelta</span><span class="p">(</span>
          <span class="n">seconds</span><span class="o">=</span><span class="bp">self</span><span class="o">.</span><span class="n">inf_renew_time</span><span class="p">)</span>
      <span class="k">if</span><span class="p">(</span> <span class="n">inf_renew</span> <span class="o">&lt;</span> <span class="n">current_timestamp</span> <span class="p">):</span>
        <span class="n">make_new_cred</span> <span class="o">=</span> <span class="bp">True</span>
        <span class="k">while</span><span class="p">(</span> <span class="n">make_new_cred</span> <span class="p">):</span>
          <span class="n">new_cred</span> <span class="o">=</span> <span class="nb">unicode</span><span class="p">(</span><span class="n">uuid</span><span class="o">.</span><span class="n">uuid4</span><span class="p">())</span>
          <span class="k">if</span><span class="p">(</span> <span class="ow">not</span> <span class="n">core_instance</span><span class="o">.</span><span class="n">_ListCredentials</span><span class="p">(</span><span class="n">new_cred</span><span class="p">)</span> <span class="p">):</span>
            <span class="n">core_instance</span><span class="o">.</span><span class="n">_UpdateCredential</span><span class="p">(</span><span class="n">search_credential</span><span class="o">=</span><span class="n">credential</span><span class="p">,</span>
                                            <span class="n">update_credential</span><span class="o">=</span><span class="n">new_cred</span><span class="p">)</span>
            <span class="n">make_new_cred</span> <span class="o">=</span> <span class="bp">False</span>
            <span class="k">return</span> <span class="n">new_cred</span> <span class="c"># Infinite key re issued</span>
      <span class="k">return</span> <span class="s">u&#39;&#39;</span> <span class="c"># Infinite key is valid</span>
    <span class="k">elif</span><span class="p">(</span> <span class="n">db_timestamp</span> <span class="o">&gt;</span> <span class="n">current_timestamp</span> <span class="p">):</span>
      <span class="k">if</span><span class="p">(</span> <span class="n">credential_dict</span><span class="p">[</span><span class="s">&#39;user&#39;</span><span class="p">]</span> <span class="o">!=</span> <span class="n">user_name</span> <span class="p">):</span>
        <span class="k">return</span> <span class="bp">None</span>
      <span class="n">core_instance</span><span class="o">.</span><span class="n">_UpdateCredential</span><span class="p">(</span><span class="n">search_credential</span><span class="o">=</span><span class="n">credential</span><span class="p">,</span>
                                      <span class="n">update_credential</span><span class="o">=</span><span class="n">credential</span><span class="p">)</span>
      <span class="k">return</span> <span class="s">u&#39;&#39;</span> <span class="c"># Key is valid</span>
    <span class="n">core_instance</span><span class="o">.</span><span class="n">_RemoveCredential</span><span class="p">(</span><span class="n">credential</span><span class="o">=</span><span class="n">credential</span><span class="p">)</span>

    <span class="k">return</span> <span class="bp">None</span> <span class="c"># Key is expired</span>
</div>
<div class="viewcode-block" id="CredCache.GetCredentials"><a class="viewcode-back" href="../../roster_server.html#roster_server.credentials.CredCache.GetCredentials">[docs]</a>  <span class="k">def</span> <span class="nf">GetCredentials</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">user_name</span><span class="p">,</span> <span class="n">password</span><span class="p">,</span> <span class="n">core_instance</span><span class="p">):</span>
    <span class="sd">&quot;&quot;&quot;Return a valid credential string given a username and password.</span>

<span class="sd">    Inputs:</span>
<span class="sd">      user_name: strin of login for a user</span>
<span class="sd">      password: string of user&#39;s password</span>
<span class="sd">      core_instance: instance of Core</span>

<span class="sd">    Outputs:</span>
<span class="sd">      string: credential string</span>
<span class="sd">              example: u&#39;be4d4ecf-d670-44a0-b957-770e118e2755&#39;</span>

<span class="sd">    Raises:</span>
<span class="sd">      AuthError         Raised on invalid username/password combination</span>
<span class="sd">    &quot;&quot;&quot;</span>
    <span class="n">user_name</span> <span class="o">=</span> <span class="nb">unicode</span><span class="p">(</span><span class="n">user_name</span><span class="p">)</span>
    <span class="n">cred_string</span> <span class="o">=</span> <span class="s">&#39;&#39;</span>
    <span class="k">if</span><span class="p">(</span> <span class="bp">self</span><span class="o">.</span><span class="n">Authenticate</span><span class="p">(</span><span class="n">user_name</span><span class="p">,</span> <span class="n">password</span><span class="p">)</span> <span class="p">):</span>
      <span class="n">current</span> <span class="o">=</span> <span class="n">core_instance</span><span class="o">.</span><span class="n">_ListCredentials</span><span class="p">(</span><span class="n">user_name</span><span class="o">=</span><span class="n">user_name</span><span class="p">)</span>
      <span class="k">if</span><span class="p">(</span> <span class="n">current</span> <span class="p">):</span>
        <span class="k">return</span> <span class="n">current</span><span class="o">.</span><span class="n">keys</span><span class="p">()[</span><span class="mi">0</span><span class="p">]</span>
      <span class="n">make_new_cred</span> <span class="o">=</span> <span class="bp">True</span>
      <span class="k">while</span><span class="p">(</span> <span class="n">make_new_cred</span> <span class="p">):</span>
        <span class="n">cred_string</span> <span class="o">=</span> <span class="nb">unicode</span><span class="p">(</span><span class="n">uuid</span><span class="o">.</span><span class="n">uuid4</span><span class="p">())</span>
        <span class="k">if</span><span class="p">(</span> <span class="ow">not</span> <span class="n">core_instance</span><span class="o">.</span><span class="n">_ListCredentials</span><span class="p">(</span><span class="n">cred_string</span><span class="p">)</span> <span class="p">):</span>
          <span class="n">core_instance</span><span class="o">.</span><span class="n">_MakeCredential</span><span class="p">(</span><span class="n">cred_string</span><span class="p">,</span> <span class="n">user_name</span><span class="p">)</span>
          <span class="n">make_new_cred</span> <span class="o">=</span> <span class="bp">False</span>

    <span class="k">return</span> <span class="n">cred_string</span>
<span class="c"># vi: set ai aw sw=2:</span></div></div>
</pre></div>

          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../../index.html">Roster Server v0.17 documentation</a> &raquo;</li>
          <li><a href="../index.html" >Module code</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Purdue University.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
  </body>
</html>